<?php
namespace app\common\model;

use think\Model;

class BonusDetailList extends Model
{

    /*
     *  产出量
     * */
    public function todayAllBonus($date, $uid = 0){
        $where = [];
        if(!empty($date)){
            $where[] = ['c_date',"=", $date];
        }
        if($uid > 0){
            $where[] = ['uid',"=", $uid];
        }
        return $this->where($where)->sum("token");
    }
}